<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>main_ui.gui</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://momsn.googlecode.com">Momsn</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="main_ui-module.html">Module&nbsp;main_ui</a> ::
        Class&nbsp;gui
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="main_ui.gui-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class gui</h1><span class="codelink"><a href="main_ui-pysrc.html#gui">source&nbsp;code</a></span><br /><br />
The main User Interface of the program. Contains the login window and 
  the contact list for the user.<br /><br />

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="quit"></a><span class="summary-sig-name">quit</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">window</span>)</span><br />
      Quit the main program and all chats</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.quit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="login_window"></a><span class="summary-sig-name">login_window</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Function to create the login window</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.login_window">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="login"></a><span class="summary-sig-name">login</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">button</span>)</span><br />
      Login procedure when the login button is clicked</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="lock_login"></a><span class="summary-sig-name">lock_login</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.lock_login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unlock_login"></a><span class="summary-sig-name">unlock_login</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.unlock_login">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="status_box"></a><span class="summary-sig-name">status_box</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.status_box">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="contact_window"></a><span class="summary-sig-name">contact_window</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">my_instance</span>,
        <span class="summary-sig-arg">main_server</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.contact_window">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="code_state"></a><span class="summary-sig-name">code_state</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">state</span>,
        <span class="summary-sig-arg">reverse</span>=<span class="summary-sig-default">False</span>)</span><br />
      Switch between the states from user version to server version if 
      reverse is true server -&gt; user, NLN -&gt; Online else user -&gt; 
      server, Online -&gt; NLN</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.code_state">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_init_state"></a><span class="summary-sig-name">set_init_state</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">state</span>)</span><br />
      Set the initial state of the user in the status box</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.set_init_state">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="change_state"></a><span class="summary-sig-name">change_state</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">combobox</span>,
        <span class="summary-sig-arg">change</span>=<span class="summary-sig-default">True</span>)</span><br />
      Change the State of the user</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.change_state">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="add_user"></a><span class="summary-sig-name">add_user</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">user_email</span>,
        <span class="summary-sig-arg">user_instance</span>=<span class="summary-sig-default">None</span>)</span><br />
      If the user instance is set, that means the user signed If the 
      userinstance isnt, we just get an email from the lst and add it to 
      the offline group</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.add_user">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="rem_user"></a><span class="summary-sig-name">rem_user</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">email</span>)</span><br />
      If the users signs out (FLN) we remove them from the online groups
      and into the offline, adding their iters to each group 
      respectively.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.rem_user">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="create_chat_window"></a><span class="summary-sig-name">create_chat_window</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.create_chat_window">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="start_chat"></a><span class="summary-sig-name">start_chat</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">treeview</span>,
        <span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">view_column</span>)</span><br />
      User double clicks on a user to start chat</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.start_chat">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="new_nick"></a><span class="summary-sig-name">new_nick</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">button</span>)</span><br />
      Edit the users nickname</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.new_nick">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="change_nick"></a><span class="summary-sig-name">change_nick</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">entry</span>)</span><br />
      User changed nick, send the new nick to the server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.change_nick">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="new_pm"></a><span class="summary-sig-name">new_pm</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">button</span>)</span><br />
      Edit the users personal msg</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.new_pm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="change_pm"></a><span class="summary-sig-name">change_pm</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">entry</span>)</span><br />
      User changed p.m, send the new pm to the server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.change_pm">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="main_ui.gui-class.html#new_contact" class="summary-sig-name">new_contact</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">button</span>)</span><br />
      User clicked on the add button.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.new_contact">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="main_ui.gui-class.html#add_contact" class="summary-sig-name">add_contact</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">button</span>)</span><br />
      User entered the new buddys email address..</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="main_ui-pysrc.html#gui.add_contact">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="new_contact"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">new_contact</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">button</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="main_ui-pysrc.html#gui.new_contact">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  User clicked on the add button. User wants to add a new buddy to their
  list
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="add_contact"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_contact</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">button</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="main_ui-pysrc.html#gui.add_contact">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  User entered the new buddys email address.. we send command to server 
  to add the buddy to the list
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://momsn.googlecode.com">Momsn</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Thu Mar 13 19:31:24 2008
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
